<?php
namespace Admin\Controller;
use Think\Controller;
use Think\Think;
use Think\Auth;
class SettingController extends Controller {
    /**
     * 权限验证
     * @author 杨智超 562608962@QQ.com
     */
    function _initialize(){
            $auth=new Auth();
            if(!$auth->check(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME,$_SESSION["id"])){
                $this->error('没有权限',U("Admin/Index/login"));exit();
            }
    }
    /**
     * 基本设置
     * @author 杨智超 562608962@QQ.com
     */
    public function system_base(){
        $config=M("config");
        if($_POST){
            $where["id"]=1;
            $config->where($where)->save($_POST);
        }
        $info=$config->find();
        $this->assign("info",$info);
        $this->display("system_base");
    }
    
}